<?php echo $this->render('resource/advertise/_tab.phtml');?>
<form action="" method="post" enctype="multipart/form-data"<?php echo ' autocomplete="off"'?>>
<?php echo $this->form()->hidden('referer', $this->referer) . "\n";?>
<div class="body">
	<table class="form">
		<tr>
			<th colspan="2"><?php echo $this->language('ADVERTISEMENT INFORMATION');?>:</th>
		</tr>
		<tr>
			<td width="180"><label><span class="red">*</span> <?php echo $this->language('Name');?></label></td>
			<td>
				<?php echo $this->form()->text('name', $this->row->getName(), array('size' => '30', 'maxlength' => '50'));?>
				<code><?php echo $this->language('Between 2~50 characters');?>.</code>
			</td>
		</tr>
		<tr>
			<td><label><span class="red">*</span> <?php echo $this->language('Ad Width/Height');?></label></td>
			<td>
				<?php echo $this->form()->text('width', $this->row->getWidth(), array('size' => '8', 'maxlength' => '4'));?>
				x
				<?php echo $this->form()->text('height', $this->row->getHeight(), array('size' => '8', 'maxlength' => '4'));?>
				<code><?php echo $this->language('Numeric Only');?>.</code>
			</td>
		</tr>
		<tr>
			<td><label><?php echo $this->language('Description');?></label></td>
			<td>
				<?php echo $this->form()->text('description', $this->row->getDescription(), array('size' => '50', 'maxlength' => '200'));?>
				<code><?php echo $this->language('Optional');?>.</code>
			</td>
		</tr>
		<tr>
			<th colspan="2"><?php echo $this->language('DEFAULT SETTING');?>:</th>
		</tr>
		<tr>
			<td><label><?php echo $this->language('Default Resource');?>..</label></td>
			<td>
				<input type="file" name="hash" size="30" />
				<code><?php echo $this->language("Only supports for");?>: <strong><?php echo strtoupper(implode(',', resource_config_advertise::getExtensions()));?></strong></code>
				<?php if($this->row->getResource()->getHash()) { ?>
				<code><a href="<?php echo $this->row->getResource()->getOriginal(false);?>" target="_blank"><?php echo $this->row->getResource()->getOriginal(false);?></a></code>
				<div style="font-weight:bold;padding:5px 0 3px 0;">
					<input type="checkbox" name="deleteResource" id="deleteResource" value="1" />
					<label for="deleteResource" class="for-checkbox"><?php echo $this->language('Delete Resource');?></label>
				</div>
				<?php } ?>
			</td>
		</tr>
		<tr>
			<td><label><?php echo $this->language('Default URL');?></label></td>
			<td><?php echo $this->form()->text('url', $this->row->getUrl(), array('size' => '50'));?></td>
		</tr>
		<tr>
			<td></td>
			<td>
				<button type="submit" name="submit" value="submit"><?php echo $this->language('Submit');?></button>
				<?php
				if($this->row->getId()) {
					echo $this->render('include/deleteButton.phtml');
				}
				?>
			</td>
		</tr>
	</table>
</div>
</form>
